package com.mayi.zds.service.imp;

import com.mayi.zds.dao.OrderDAO;
import com.mayi.zds.dao.OrderItemDAO;
import com.mayi.zds.entity.OrderItem;
import com.mayi.zds.service.OrderItemService;
import com.mayi.zds.utils.ZdsUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName OrderItemServiceImpl
 * @Author zhong
 * @Date 2019/12/24 17:54:22
 * @Version 1.0
 */
@Service
public class OrderItemServiceImpl implements OrderItemService {

    @Autowired
    private OrderItemDAO orderItemDAO;

    @Autowired
    private OrderDAO orderDAO;

    /**
     * 增加订单项
     *
     * @param orderItem
     * @return void
     * @Author zhong
     * @Date 2019/12/24 16:40:12
     **/
    @Override
    public void add(OrderItem orderItem) {
        orderItem.setId(ZdsUtils.produceId());
        orderItemDAO.add(orderItem);
    }

    /**
     * 根据订单ID获取订单详细列表
     *
     * @param oid 订单ID
     * @return java.util.List<com.zhong.myshop.entity.OrderDetail>
     * @Author zhong
     * @Date 2019/12/04 20:43:59
     **/
    @Override
    public List<OrderItem> getListByOrderId(String oid) {
        return null;
    }
}
